-
-
Notifications
You must be signed in to change notification settings - Fork 92
Release 5.0.8 #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release 5.0.8 #62
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughAdds a public Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Dev as Developer (uses SwiftUI)
participant SW as VisualEffect (SwiftUI wrapper)
participant UI as VisualEffectView (UIKit)
Dev->>SW: init(..., saturation: CGFloat = 1, ...)
SW->>UI: makeUIView(...) and set UI.saturation = saturation
note right of UI: saturation defaults to 1.0\napplied to .saturationDeltaFactor
Dev->>SW: update with new parameters
SW->>UI: updateUIView(...) and set UI.saturation = saturation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
README.md (1)
53-53: Clarify range and mirror SwiftUI docs; update example.
- Add acceptable range (e.g., >= 0) to avoid misuse.
- Also document in the SwiftUI Usage section and reflect in the example initializer.
Apply this edit to the declaration line:
-var saturation: CGFloat // saturation factor. default is 1 +var saturation: CGFloat // saturation factor (>= 0). default is 1And update the SwiftUI example later in the file to include the new parameter (outside this hunk), e.g.:
VisualEffect(colorTint: .white, colorTintAlpha: 0.5, blurRadius: 10, saturation: 1, scale: 1)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
README.md(1 hunks)Sources/VisualEffectView/VisualEffectView+SwiftUI.swift(5 hunks)Sources/VisualEffectView/VisualEffectView.swift(2 hunks)
🧰 Additional context used
🧬 Code graph analysis (3)
README.md (2)
Example/ContentView.swift (1)
blurRadius(12-47)Sources/VisualEffectView/UIViewEffectView+Helpers.swift (2)
backdropView(10-30)prepareForChanges(23-26)
Sources/VisualEffectView/VisualEffectView.swift (1)
Sources/VisualEffectView/UIViewEffectView+Helpers.swift (3)
prepareForChanges(23-26)backdropView(10-30)applyChanges(27-29)
Sources/VisualEffectView/VisualEffectView+SwiftUI.swift (2)
Example/ContentView.swift (1)
blurRadius(12-47)Sources/VisualEffectView/UIViewEffectView+Helpers.swift (2)
prepareForChanges(23-26)backdropView(10-30)
🔇 Additional comments (7)
Sources/VisualEffectView/VisualEffectView.swift (2)
118-118: Key added correctly.The KVC key
saturationDeltaFactormatches the property and keeps parity with existing keys.
63-73: Clamp input and skip no-op saturation updates- open var saturation: CGFloat { - get { return _value(forKey: .saturationDeltaFactor) ?? 1.0 } - set { _setValue(newValue, forKey: .saturationDeltaFactor) } - } + open var saturation: CGFloat { + get { return _value(forKey: .saturationDeltaFactor) ?? 1.0 } + set { + let clamped = max(0, newValue.isFinite ? newValue : 1.0) + guard clamped != saturation else { return } + _setValue(clamped, forKey: .saturationDeltaFactor) + } + }Please verify on iOS 14–18 that setting
saturationvia KVC still takes effect without an explicitprepareForChanges()/applyChanges()call; if not, restore the prepare/apply pattern after_setValue.Sources/VisualEffectView/VisualEffectView+SwiftUI.swift (5)
40-47: Good docs for the new parameter.Clear behavior description and default noted.
83-84: Propagation in makeUIView looks correct.Property is set alongside other knobs.
95-95: Propagation in updateUIView looks correct.Updates track state changes as expected.
106-106: Nice preview coverage.Example showcases the new parameter.
66-72: No positional argument usage found; initializer remains source-compatible.
Checklist
Motivation and Context
Description
Summary by CodeRabbit
New Features
Documentation